/**
 * 
 */
package org.framework2.test.webserver;

import java.io.IOException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.log4j.PropertyConfigurator;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.FileSystemResource;

/**
 * <p>
 * 应用程序入口类
 * </p>
 * @see 
 * @author ahli
 * @version WebServerTestMockV1, 2010-8-19
 * @since WebServerTestMockV1
 */
public class AppServer {

	private static final Log log = LogFactory.getLog(AppServer.class);
	
	/**
	 * 程序入口main方法
	 * @param args
	 */
	public static void main(String[] args) {
		PropertyConfigurator.configure("bin/log4j.properties");
		XmlBeanFactory factory = new XmlBeanFactory(new FileSystemResource("bin/applicationContext.xml"));
		WSTMServer server = factory.getBean("server", WSTMServer.class);
		try {
			server.start();
		} catch (IOException e) {
			log.error(e.toString());
		}
	}
}
